<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>

</h:head>
<h:body>
	<div align="center">
		<p:panel header="Login" style="width: 400px">
			<h:form>
				<p:growl id="growl" sticky="true" showDetail="true" />
				<table>
					<tr>
						<td align="left"><h:outputLabel for="username"
								value="Usuario: *" />
						</td>
						<td align="left"><p:inputText value="#{loginBean.username}"
								id="username" required="true" label="username" width="20" />
						</td>
					</tr>
					<tr>
						<td align="left"><h:outputLabel for="password"
								value="CLave: *" />
						</td>
						<td align="left"><h:inputSecret value="#{loginBean.password}"
								id="password" required="true" label="password" />
						</td>
					</tr>
					<tr>
						<td align="left"><h:outputLabel value="Compañía: " />
						</td>
						<td align="left"><p:selectOneMenu
								value="#{loginBean.compania}">
								<f:selectItem itemLabel="Escoja una" />
								<f:selectItems value="#{loginBean.companias}" />
							</p:selectOneMenu>
						</td>
					</tr>
					<tr>
						<td align="left"><h:outputLabel value="" /></td>
						<td align="right"><p:commandButton value="Login"
								update="growl" action="#{loginBean.login()}" /></td>
					</tr>
				</table>
			</h:form>

		</p:panel>
	</div>
</h:body>
</html>